package game.gui.panelmenu;

import game.controler.ecouteurs.menu.EcouteurMenuPrincipal;
import java.awt.Component;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Gab'z
 */
public class PanelCredit extends JPanel {

    private static PanelCredit panelCredit;

    private PanelCredit() {
        this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        this.setSize(980, 810);

    }

    public static PanelCredit getPanelCredit() {
        if (panelCredit == null) {
            panelCredit = new PanelCredit();
            JLabel label;
            label = new JLabel("JEU ASYLUM");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel("==========");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel(" ");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel("Réalisé par :");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel("Flavien Kencker");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel("Olivia Reaney");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel("Arnaud Schwartz");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel(" ");
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
            label = new JLabel("RETOUR AU MENU PRINCIPAL");
            label.addMouseListener(new EcouteurMenuPrincipal());
            label.setAlignmentX(Component.CENTER_ALIGNMENT);
            panelCredit.add(label);
        }
        return panelCredit;
    }
}
